#include<stdio.h>
int main()
{
    void ave(float x[ ],int n);
    void search(float(*p)[4],int n);
    float score[3][4]={{56,78,77,90},{78,34,77,89},{43,89,89,60}};
    ave(*score,12);
    search(score,2);//这里是寻找地址，不需要加*
    return 0;
}
void ave(float *p,int n)
{
    float *p_end;
    float sum=0,aver;
    p_end=p+n-1;
    for(;p<=p_end;p++)
    {
        sum=sum+(*p);
    }
    aver=sum/n;
    printf("average =%5.2f\n",aver);
}
void search(float(*p)[4],int n)
{
    int i;
    printf("the score of No.%d are :\n",n);
    for(i=0;i<4;i++)
        printf("   %5.2f",*(*(p+n)+i));
    printf("\n");
}